package com.tyq.client.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 谭永强
 * @date 2023-02-28
 */
@RestController
public class TestController {

    /**
     * 获取当前用户信息
     *
     * @param authentication 当前用户信息
     * @return 用户信息
     */
    @RequestMapping("getCurrentUser")
    public Object getCurrentUser(Authentication authentication) {
        return authentication;
    }

    /**
     * 权限判断
     *
     * @return
     */
    @RequestMapping("hasPermission")
    public Object hasPermission() {
        return false;
    }
}
